import requests
from lxml import etree, html
from bs4 import BeautifulSoup

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}


def get_html(url):
    '''
    发送http请求获取页面源代码
    '''

    try:
        response = requests.get(url, headers=headers)
        if response.status_code == 200:
            return response.text
        else:
            return None
    except Exception as e:
        print(e)
        return None


def parse_html(html_xml, xpath_rule):
    '''
    解析页面源代码, 并根据xpath规则提取所需数据
    '''
    data = []
    selector = etree.HTML(html_xml)
    results = selector.xpath(xpath_rule)
    for result in results:
        data.append(result)
    return data

    # data = []
    # selector = BeautifulSoup(html, 'html.parser')

    # print(selector)

    # results = selector.find('div',id_='psmsdatalist_wrapper')

    # print(results)

    # tr = results.find_all('li')
    # print(tr,'比偶齐纳')
    # # return results
    # # for result in results:
    # #     data.append(result)
    # # return data


def start_spider(target_url, xpath_rule):
    '''
    启动爬虫程序
    '''
    html = get_html(target_url)
    print(html)
    if html:
        results = parse_html(html, xpath_rule)
        return results
    else:
        return None


target_url = 'http://zbb.tju.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&catalog=A&cate=50133'
xpath_rule = '//*[@id="psmsdatalist"]/tbody/tr[2]/td/li/a'

# results = start_spider(target_url, xpath_rule)
# print(results)


'''
1 执行器
执行网站的url进行数据爬取

2 解析
将爬取的网站html进行数据解析

3 配置
将数据解析完成的进行去重操作
??

4 监控
钉钉机器人进行通知操作

{
    'url':
    'title':
    'data':
    '关键字':
}


keywords = []
'''
# keywords = ['人力资源系统', '招聘系统', '绩效考核系统', '酒店系统', '预算系统', '全面预算系统', '招生系统', '软件开发', 
#             '软件定制', '系统开发', '系统定制', '数字化', '信息化', '智能档案', '档案系统', '数字化加工',]


# {
#     'name':'天津大学招标信息网',
#     'url':'http://zbb.tju.edu.cn/sfw_cms/e',
#     'params':{
#         'window_': 'json',
#         'start': '1',
#         'limit': '25',
#         'filter': '',
#         'sort': 'begin_time desc,sync_time desc',
#         'type': 'CSXQ',
#         'type': 'ZCXQ',
#         'type': 'BYXQ',
#         'type': 'YQXQ',
#         'shopType': '',
#         'orgType': '',
#         'catalog': '',
#         'keywords': '',
#         'request_method_': 'ajax',
#         'browser_': 'notmsie',
#         'page': 'cms.psms.publish.query'
#     },
#     'headers':{'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'},
#     'data': 'resultset',
#     'announcement':'http://zbb.tju.edu.cn/provider/#/publish/',
#     'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
#     '翻译':['标题', '发布时间', '标名', '公告链接'],
#     'methos':'post'
# },
# {
#     'name':'西藏自治区',
#     'url':'http://www.ccgp-xizang.gov.cn/freecms/rest/v1/notice/selectInfoMoreChannel.do',
#     'params':{
#         'siteId': '18de62f0-2fb0-4187-a6c1-cd8fcbfb4585',
#         'channel': 'b541ffff-03ee-4160-be64-b11ccf79660d',
#         'currPage': '1',
#         'pageSize': '100',
#         'noticeType': '00101',
#         'cityOrArea': '',
#         'noticeName': '',
#         'operationStartTime': '',
#         'operationEndTime': '',
#         'selectTimeName': 'noticeTime',
#     },
#     'headers':{
#         'Accept':'*/*',
#         'Accept-Encoding':'gzip, deflate',
#         'Accept-Language':'zh-CN,zh;q=0.9',
#         'Connection':'keep-alive',
#         'Content-Type':'application/json;charset=utf-8',
#         'Cookie':'JSESSIONID=52799FFC4B32B7D6BBBDAEDDC3FE19FD; _gscu_1288686867=84480969wfd7qm22; _gscbrs_1288686867=1; _gscs_1288686867=84480969dft1sv22|pv:3',
#         'Host':'www.ccgp-xizang.gov.cn',
#         'Referer':'http://www.ccgp-xizang.gov.cn/freecms/site/xizang/xzcggg/index.html',
#         'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
#         'X-Requested-With':'XMLHttpRequest'
#     },
#     'data': 'data',
#     'announcement':'http://www.ccgp-xizang.gov.cn/freecms/',
#     'agrs':['shorttitle', 'addtimeStr', 'title', 'htmlpath'],
#     '翻译':['标题', '发布时间', '标名', '公告链接'],
#     'methos':'get'
# },
# {
#     'name':'陕西省政府采购网',
#     'url':'http://www.ccgp-shaanxi.gov.cn/freecms/rest/v1/notice/selectInfoMoreChannel.do?',
#     'params':{
#         'siteId': 'a7a15d60-de5b-42f2-b35a-7e3efc34e54f',
#         'channel': '1eb454a2-7ff7-4a3b-b12c-12acc2685bd1',
#         'currPage': '1',
#         'pageSize': '11',
#         'regionCode': '610001',
#         'noticeType': '00101',
#         'cityOrArea': '',
#         'selectTimeName': 'noticeTime',
#     },
#     'headers':{
#         'Accept':'*/*',
#         'Accept-Encoding':'gzip, deflate',
#         'Accept-Language':'zh-CN,zh;q=0.9',
#         'Connection':'keep-alive',
#         'Content-Type':'application/json;charset=utf-8',
#         'Cookie':'JSESSIONID=52799FFC4B32B7D6BBBDAEDDC3FE19FD; _gscu_1288686867=84480969wfd7qm22; _gscbrs_1288686867=1; _gscs_1288686867=84480969dft1sv22|pv:3',
#         'Host':'www.ccgp-xizang.gov.cn',
#         'Referer':'http://www.ccgp-xizang.gov.cn/freecms/site/xizang/xzcggg/index.html',
#         'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
#         'X-Requested-With':'XMLHttpRequest'
#     },
#     'data': 'data',
#     'announcement':'http://www.ccgp-xizang.gov.cn/freecms/',
#     'agrs':['shorttitle', 'addtimeStr', 'title', 'htmlpath'],
#     '翻译':['标题', '发布时间', '标名', '公告链接'],
#     'methos':'get'
# },
# {
#     'name':'云南省政府采购网',
#     'url':'http://www.yngp.com/api/firstpage/firstpage.gghtlist.svc',
#     'params':{
#         'LEVEL': '2',
#         'TYPE': '1'
#     },
#     'headers':{
#         'Accept':'text/plain, */*; q=0.01',
#         'Accept-Encoding':'gzip, deflate',
#         'Accept-Language':'zh-CN,zh;q=0.9',
#         'Connection':'keep-alive',
#         'Content-Length':'229',
#         'Content-Type':'multipart/form-data; boundary=----WebKitFormBoundarykPHkcyab8wf27mEu',
#         'Cookie':'xincaigou=49737.2924.1035.0000; route=e383da5a665a29e8aebc7eee693cc945; JSESSIONID=ucYzS5pzWK2fKJif1bUqXnOj0xhx_gk-5cnI32qT3rfV-qP6hDai!-128961528',
#         'Host':'www.yngp.com',
#         'Origin':'http://www.yngp.com',
#         'Referer':'http://www.yngp.com/index.html',
#         'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
#         'X-Requested-With':'XMLHttpRequest',
#     },
#     'data': 'data',
#     'announcement':'http://www.yngp.com/showBulletinInfo.html?bulletin_id=',
#     'agrs':['BULLETINTITLE', 'FINISHDAY', 'DISTRICTNAME', 'BULLETIN_ID'],
#     '翻译':['标题', '发布时间', '标名', '公告链接'],
#     'methos':'post'
# },
# {
#     'name':'四川省政府采购网',
#     'url':'http://www.ccgp-sichuan.gov.cn/freecms/rest/v1/notice/selectInfoMoreChannel.do?',
#     'params':{
#         'siteId': '94c965cc-c55d-4f92-8469-d5875c68bd04',
#         'channel': 'c5bff13f-21ca-4dac-b158-cb40accd3035',
#         'currPage': '1',
#         'pageSize': '10',
#         'noticeType': '00101',
#         'regionCode': '',
#         'purchaseManner': '',
#         'title': '',
#         'openTenderCode': '',
#         'purchaser': '',
#         'agency': '',
#         'purchaseNature': '',
#         'operationStartTime': '',
#         'operationEndTime': '',
#         'selectTimeName': 'noticeTime',
#         'cityOrArea': '',
#     },
#     'headers':{
#         'Accept':'*/*',
#         'Accept-Encoding':'gzip, deflate',
#         'Accept-Language':'zh-CN,zh;q=0.9',
#         'Connection':'keep-alive',
#         'Content-Type':'application/json;charset=utf-8',
#         'Cookie':'JSESSIONID=0A34D6E626FC36260A59131389F5109E; __session:sessionID:=http:; __session:sessionID:htmlRevolving=DwGwlgBGAmC8BEBhALANgJwHYCCiCMAIgAwEBCyOArOhsuqdgMwBiBeeWAoqvBAMYB7aAFMAzgkp4i0vL0EjRASQB2IgB4JAgO6Aac0DlfrxDCAbsJAA5AK4BbBLP4gAhqPHxwogC4AJYQ5EAneAA+YAcIAAs-YQAzBCCdXWAAegdgxPBg8Cg4eEpkKL4+AA4AJkwAWmFoaEoy9mEAIzLCvGhUMqiHPFRGYSJ0Qqj6+rkhMQkpCZGFFXUEQAQjQF+EwCA9A2NTSxt4YqCQ8MiY+F53Bz8Ac2F3BAB9esdlAGsgxaWklKT00EgYCTy+KKIougKlUanVGs1Wu1Ot1ev1BvVhMIpmMclJMEQ7PIxDNhBp4IBXv0AzGkrCCGEzmawIbbBUIRaKxCDHM4Xa63BwPIJEl7JVIfTLfHK-f6A4HVWp4BpNFptDpdHp9AZDBwOZEuSRERgY1U4vGAK8DAISxJLJ60pWx2tP2DKZ50u8Bud0egQN3LeaTAGS+2Vy+WFQMqYrBUshsphCvhmNGaqkyC1-EjOoQgABTQC55oBGoKNawpm2puzpByOJxtrIdQRT6devPdnyyPx9AL9IPFkohMuh8rhQ22cYU4yIlFjWKUqlxCEAHzaAPd0M+SNlTzXt6YdGYWWXa2RzAhOXZWPTXBXWRf7QRLwdKoXLYYr6oxVb3UAP48O8YB2-WJq2nppzFoXBeZtvt7MdF8t3eKt+S9IV61FI9m1PEN20vZAb1RIhCnvaZHwQQB-PUAYUUpxNbM5zzK1lz-NdHRw4C3R3AVvT+SDDybE9gzbC94UoJD1XQNDsQw+BACEEwBA7TwrNZxped8yXX9iwAoJBMovlPVrOiD0bQMWzPUMO3qHhuxRSQpG4odZngQBQxUAfRthJnM0xKIxdrRXf913M+TQMUvdlIbANjyDVtzzDIZMA49hJl0oyR3gQAFOUARx1LI-QjLTskjpPXaKXOo8D9086CmN8zTL0wJxoCiPAu0HcY8E1CN0OMwB1ZUAUUVYoImyEp-ItVxLQJ6rS6saIglSvJg5i-K09AgrwGMqp44zAEh3GK33w0TcxayS2scx1Zu6sClN9KDGJ8jT4PDIgxv7SawrxQAc7UAPu1GsWr8JPs0iOuuza3NonaGLU2CWP8+p2DGu8zoTeBMMASO1buspbvxWhyyKCMHXt3d76NU7z1Lg1ihhKsb0SB3jAD74yd5pEyH7uIqT2pkwJCcR3rMt2r6hry8Nr1C8rULx4zAFG08Hiasz9xPJ1a4cCHnaYyjyGbR77hsvcaxq4znwsAF91AFo5CGBds1rYY6tXxe2lGBpyg7Mb+9i2dRYoZG1XjABFY19SUzfn4uhx7ksde39fcj7UcG3LDqxnSytRRhin+0LgcAfjTAF11QB50MAedNABj-ePdUAbptxz5uLmtdpLKfXGOE+TtPxwrED0oN-rsv2jHfrwQKLckRhGHDwdgcADFdAB1tBPi8zpqoYe3O1qCTvu-T0uqJ6iWfaN6ufq0vBCiCxhkBbh9jMAScUosAXX0U-T3u7sFxKKaHwJN534vx4UpG+qyvb0bnuXF4bzVrYj3jAGlbQBV6MALmVACQlffSYQA8AAT0MAgQQIABB+AAFwQAAMTMEQQAbl4FrGGT0qZfz-pfd0QA',
#         'Host':'www.ccgp-sichuan.gov.cn',
#         'Referer':'http://www.ccgp-sichuan.gov.cn/cms-sc/site/sichuan/cggg/index.html',
#         'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
#         'X-Requested-With':'XMLHttpRequest'
#     },
#     'data': 'data',
#     'datachild': 'data',
#     'announcement':'http://www.ccgp-sichuan.gov.cn/freecms',
#     'agrs':['title', 'noticeTime', 'shorttitle', 'htmlpath'],
#     '翻译':['标题', '发布时间', '标名', '公告链接'],
#     'methos':'get'
# },
# {
#     'name': '重庆理工大学采购与招标管理中心',
#     'url': 'https://clcz.cqut.edu.cn/lgwebsite/api/v1/notices/stable',
#     'params': {
#         "__platDomain__": "clcz.cqut.edu.cn",
#         "directoryCode": "A",
#         "pi": "1",
#         "ps": "20",
#         "sourceType": "1,2,3",
#         "type": "100,200,201,202,203,204,205,206,207,309,400,401,402,3091,4001,888,889,890",
#         "MmEwMD": "4G19N7xtxi2eesu7wTvYwSxVsCLuP461YY4FsfO8kJrHJv06KfTGThpBiju2L0.nagS7ca9d9LZs3hMIKwjpDzqolcv"
#                   "5pQy_IuwCZG0rARst0OArUZYqZssr8mvetw7CBqehZV79RMAADVvdOHOLzj7KETdDxMXSyPYw86Wz13ycMf4MZEer85"
#                   "Gujy3lMFLizgKgpJmEU6wjrlIlqYzdy2d9CMwXWxgUmZaqKYJEezsP_TN.VzIUbeqcLihXx7d5g5jk1xqdzL91SjODk"
#                   "H8wUsx6pyze49AaouBTF82S0PE70j7t6GFH8oOuN9BHrbp5r0pP83qlODhBuFJrxpmNhKjAS_BQVzdGfyf1Hxcnk4Xl"
#                   "PGQi4gbqJG7SFNSIojQRq2AQniT8JHEDIFqPKdASiCHdTjiLCvOaWUjhBuUScpYvHDJtePNY4KKB4zYkmXzDhDCz"
#     },
#     'headers': {
#         # "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
#         # "method": "get",
#         # "path": "/sfw_cms/e",
#         # "scheme": "https",
#         "accept": "*/*",
#         "accept-encoding": "gzip,deflate,br",
#         "accept-language": "zh-CN,zh;q=0.9",
#         # "cache-control": "no-cache",
#         "connection": 'keep-alive',
#         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
#         "cookie": "FSSBBIl1UgzbN7N443S=og8naiTisAig0uObNSchpl6hopIG0hMKVDuxq8FT7iXUcbax_5JPXCbpIlKfFVFd; SECKEY"
#                   "_ABVK=IV1JdTlqfQfsa1Qa8wgsywsOTd//Z9f4+PNzVUJ0xNc%3D; FSSBBIl1UgzbN7N443T=406z4g7kMFq0BoK2Hf"
#                   "cQH27wrPJ_aB1Mor8srTDUpR9DIup5lTANvI0bQ5K7_Gi4P7V2A9rCCZRFtI5KlxH3Vy2iKf.PSiaMqxx22dJvth2g7b"
#                   "P7GghcBsdPf.lDqsE28X8sOsn5iN06kLn6.W2JPwRmAXBYZRV9dlqL6M_KHZlnD6.TruTO9ZorKeu4jY2PXYY1dgo4Cz"
#                   "VfcUrrxTCKJnxmAAcujxMG_DR0UFSy0Mfm87lVKKxE5CCKA28jEvcHGsrkl1SmtFSbqUlnU5gWiLn5i4JdNu5TWA4o3u"
#                   "jCt5BzH8HqHTZkfEwt.vojVYDd7J8Tg7Q1FFgWJ4foXXvPlfScCafvTF_UuiQRlBtwpnmmCHphNZTz.F8_kmMRRm8udn"
#                   "N3",
#         # "origin": "https://cgpt8090.kmmu.edu.cn",
#         "Host": "clcz.cqut.edu.cn",
#         "pragma": "no-cache",
#         "referer": "https://clcz.cqut.edu.cn/",
#         "sec-ch-ua-mobile": "?0",
#         "sec-ch-ua": '''Google Chrome';v="113", "Chromium";v="113", "Not-A.Brand";v="24''',
#         "sec-ch-ua-platform": "Windows",
#         "sec-fetch-dest": "empty",
#         "sec-fetch-mode": "cors",
#         "sec-fetch-site": "same-origin",
#         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36",
#         "x-requested-with": "XMLHttpRequest"
#     },
#     'data': 'rows',
#     'datachild': 'data',
#     'announcement': '',
#     'agrs': ['XMMC', 'GGFBRQ', 'XMMC', 'XMMC'],
#     '翻译': ['标题', '发布时间', '标名', '公告链接'],
#     'methos': 'get'
# },


keywords = ['广州大学2023年计算机科学与网络工程学院黄埔校区专用教学类设备购置项目（CZ2023-0642）采购更正公告（第一次）']
dataList = [
    # {
    #     'name':'清华大学设备采购信息发布平台',
    #     'url':'https://sbcgczxxfb.sysc.tsinghua.edu.cn/sfw_cms/e',
    #     'params':{
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "type": "ZCXQ",
    #         "isEnd":"" ,
    #         "catalog": "",
    #         "shopType":"" ,
    #         "keywords": "",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers':{
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json,text/javascript,*/*;q=0.01",
    #         "accept-encoding": "gzip,deflate, br",
    #         "accept-language": "zh-CN,zh;",
    #         "cache-control": "no-cache",
    #         "content-length": "235",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "JSESSIONID=E2425CB18B79CD75DB5955A4A35E3087.sbcgczxxfb1;contextpath=% 2Fsfw_cms;serverid=1325456",
    #         "origin": "https://sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://sbcgczxxfb.sysc.tsinghua.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #             },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement':'https://sbgysfw.sysc.tsinghua.edu.cn/#/publish/',
    #     'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #     '翻译':['标题', '发布时间', '标名', '公告链接'],
    #     'methos':'post'
    # },
    # {
    #     'name':'上海交通大学招投标与政府采购办公室',
    #     'url':'https://pboffice.sjtu.edu.cn/sfw_cms/e',
    #     'params':{
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "type": "ZCXQ",
    #         "isEnd":"" ,
    #         "categoryId": "103250",
    #         "ggType": "GG",
    #         "keywords": "",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers':{
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "JSESSIONID=AE26FD3523BC3C3C7A2D6A2611ED5E84",
    #         "origin": "https://pboffice.sjtu.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://pboffice.sjtu.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=GG&cate=103250",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #             },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement':'https://pboffice.sjtu.edu.cn/provider/#/publish/',
    #     'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #     '翻译':['标题', '发布时间', '标名', '公告链接'],
    #     'methos':'post'
    # },
    # {
    #     'name':'浙江大学采购网',
    #     'url':'http://www.zupc.zju.edu.cn/cms/e',
    #     'params':{
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "type": "ZCXQ",
    #         "isEnd":"" ,
    #         "categoryId": "103250",
    #         "ggType": "GG",
    #         "keywords": "",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers':{
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "contextpath=%2Fcms; JSESSIONID=CCDA6A5C1F52003EFFA1DBCA868006A4",
    #         "origin": "http://www.zupc.zju.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://pboffice.sjtu.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=GG&cate=103250",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #             },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement':'http://www.zupc.zju.edu.cn/provider/#/publish/',
    #     'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #     '翻译':['标题', '发布时间', '标名', '公告链接'],
    #     'methos':'post'
    # },
    # {
    #     'name': '吉林大学招标与采购管理中心',
    #     'url': 'https://cgglzx.jlu.edu.cn/sfw_cms/e',
    #     'params': {
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "typePublish": "BY",
    #         "type":"",
    #         "isEnd": "",
    #         "categoryId": "103250",
    #         "ggType": "GG",
    #         "keywords": "",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers': {
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "contextpath=%2Fsfw_cms; JSESSIONID=152CC71AE2D18CECB6CF85303880B379",
    #         "origin": "https://cgglzx.jlu.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://cgglzx.jlu.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&category=FS",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #     },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement': 'https://cgglzx.jlu.edu.cn/provider/#/publish/',
    #     'agrs': ['subject', 'pdate', 'businessName', 'syncId'],
    #     '翻译': ['标题', '发布时间', '标名', '公告链接'],
    #     'methos': 'post'
    # },
    # {
    #     'name': '北京师范大学采购信息网',
    #     'url': 'https://cg.bnu.edu.cn/sfw_cms/e',
    #     'params': {
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "typePublish": "ZC",
    #         "type":"",
    #         "isEnd": "",
    #         "categoryId": "103250",
    #         "ggType": "GG",
    #         "keywords": "",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers': {
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "JSESSIONID=955BAA618BA74D438BB22E653E00F4E4",
    #         "origin": "https://cg.bnu.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://cg.bnu.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&shopping_type=WSJJ",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #     },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement': 'https://cg.bnu.edu.cn/provider/#/publish/',
    #     'agrs': ['subject', 'pdate', 'businessName', 'syncId'],
    #     '翻译': ['标题', '发布时间', '标名', '公告链接'],
    #     'methos': 'post'
    # },
    # {
    #     'name': '四川大学财务处（招标标与采购中心）',
    #     'url': 'https://cg.scu.edu.cn/sfw_cms/e',
    #     'params': {
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "type":"ZCXQ",
    #         "isEnd": "",
    #         "catalog": "",
    #         "keywords": "",
    #         "orgType": "11",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers': {
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "JSESSIONID=351CC1908BADB96291EC8789E1AD3C47",
    #         "origin": "https://cg.scu.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://cg.scu.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&orgType=11",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #     },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement': 'https://cg.scu.edu.cn/provider/#/publish/',
    #     'agrs': ['subject', 'beginTime', 'tenderName', 'syncId'],
    #     '翻译': ['标题', '发布时间', '标名', '公告链接'],
    #     'methos': 'post'
    # },
    # {
    #     'name': '南开大学招标管理办公室',
    #     'url': 'https://zbb.nankai.edu.cn/sfw_cms/e',
    #     'params': {
    #         "t_": "0.05333468927624829",
    #         "window_": "json",
    #         "start": "1",
    #         "limit": "25",
    #         "filter": "",
    #         "sort": "begin_time desc",
    #         "type":"ZCXQ",
    #         "isEnd": "",
    #         "catalog": "",
    #         "keywords": "",
    #         "orgType": "11",
    #         "request_method_": "ajax",
    #         "browser_": "notmsie",
    #         "page": "cms.psms.publish.query"
    #     },
    #     'headers': {
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate, br",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-length": "252",
    #         "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #         "cookie": "JSESSIONID=998C08D1CA20261B317BE68FCE537194",
    #         "origin": "https://zbb.nankai.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "https://zbb.nankai.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ",
    #         "sec-ch-ua-mobile": "?0",
    #         "sec-ch-ua-platform": "Windows",
    #         "sec-fetch-dest": "empty",
    #         "sec-fetch-mode": "cors",
    #         "sec-fetch-site": "same-origin",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #     },
    #     'data': 'resultset',
    #     'datachild': 'data',
    #     'announcement': 'https://zbb.nankai.edu.cn/provider/#/publish/',
    #     'agrs': ['subject', 'beginTime', 'tenderName', 'syncId'],
    #     '翻译': ['标题', '发布时间', '标名', '公告链接'],
    #     'methos': 'post'
    # },
    # {
    #     'name': '西安交通大学采购与招商',
    #     'url': 'http://cgb.xjtu.edu.cn/site/searchNeiRong',
    #     'params': {
    #         "rows": "10",
    #         "page": "1",
    #         "bt": "",
    #         "gjz": "",
    #         "fbksrq": "",
    #         "fbjzrq": "",
    #         "sjly": "",
    #         "lmid": "4af592f37641715c0176419ae14f000d",
    #         "ywlx": ""
    #     },
    #     'headers': {
    #         "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #         "method": "POST",
    #         "path": "/sfw_cms/e",
    #         "scheme": "https",
    #         "accept": "application/json, text/javascript, */*; q=0.01",
    #         "accept-encoding": "gzip, deflate",
    #         "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
    #         "cache-control": "no-cache",
    #         "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
    #         "cookie": "JSESSIONID=CAC78A7085DDF523C6C203E03BCB3AEA",
    #         "origin": "http://cgb.xjtu.edu.cn",
    #         "pragma": "no-cache",
    #         "referer": "http://cgb.xjtu.edu.cn/site/stillMore?navid=4af592f37641715c0176419ae14f000d",
    #         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.42",
    #         "x-requested-with": "XMLHttpRequest"
    #     },
    #     'data': 'rows',
    #     'datachild': 'data',
    #     'announcement': 'https://cgb.xjtu.edu.cn/site/caseInfo?nrid=',
    #     'agrs': ['JJ', 'GSKSRQ', 'BT', 'NRID'],
    #     '翻译': ['标题', '发布时间', '标名', '公告链接'],
    #     'methos': 'post'
    # },
    # {
    #         'name':'哈尔滨工业大学招标与采购管理中心',
    #         'url':'http://cgzx.hit.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "typePublish": "ZC",
    #             "type": "",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "contextpath=%2Fsfw_cms; JSESSIONID=F0D5BBD48E94D2D7E146390805FF43C2",
    #             "origin": "http://cgzx.hit.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "http://cgzx.hit.edu.cn/sfw_cms/e?page=cms.psms.gglist&shopping_type=GKCG&typeDetail=XQ",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'http://cgzx.hit.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'edate', 'businessName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'天津大学招标信息网',
    #         'url':'http://zbb.tju.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "type": "ZCXQ",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=4BADECFC9444F56A72A091A0F944D0F4",
    #             "origin": "http://zbb.tju.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "http://zbb.tju.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&catalog=A&cate=50133",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'http://zbb.tju.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'东南大学采购中心',
    #         'url':'https://dnzb.seu.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "type": "ZCXQ",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=0251AD8E542CAB6BCAD0583AE23D52C5",
    #             "origin": "https://dnzb.seu.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://dnzb.seu.edu.cn/sfw_cms/e?page=cms.psms.gglist&type=xq",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'https://dnzb.seu.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'中国农业大学国有资产管理处',
    #         'url':'https://gzc.cau.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "type": "ZCXQ",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "contextpath=%2Fsfw_cms; JSESSIONID=F9477607F6CF617B45A66E1FC26F7B0D",
    #             "origin": "https://gzc.cau.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://gzc.cau.edu.cn/sfw_cms/e?page=cms.psms.gglist&type=%E9%87%87%E8%B4%AD%E5%85%AC%E5%91%8A&typeDetail=CGGG&catalog=A",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'https://gzc.cau.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'北京理工大学招标采购中心',
    #         'url':'http://zczx.bit.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "typePublish": "ZC",
    #             "typeDetail": "XQ",
    #             "type": "",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=D3D0AC115D9DDEE34EEBB723CF88EBDA",
    #             "origin": "http://zczx.bit.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "http://zczx.bit.edu.cn/sfw_cms/e?page=cms.psms.gglist&typeDetail=XQ&catalog=A",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'http://cgzx.bit.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'重庆大学政府采购与招投标管理中心',
    #         'url':'https://ztbzx.cqu.edu.cn/sfw_cms/e',
    #         'params':{
    #             "t_": "0.05333468927624829",
    #             "window_": "json",
    #             "start": "1",
    #             "limit": "25",
    #             "filter": "",
    #             "sort": "begin_time desc",
    #             "type": "YXGK",
    #             "isEnd":"" ,
    #             "catalog": "",
    #             "shopType":"" ,
    #             "keywords": "",
    #             "request_method_": "ajax",
    #             "browser_": "notmsie",
    #             "page": "cms.psms.publish.query"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "contextpath=%2Fsfw_cms; JSESSIONID=8DEA10EAC7AAE1F7EEA5D6EC050A84D7",
    #             "origin": "https://ztbzx.cqu.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://ztbzx.cqu.edu.cn/sfw_cms/e?page=cms.psms.gglist&catalog=&typeDetail=YX",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'resultset',
    #         'datachild': 'data',
    #         'announcement':'https://ztbzx.cqu.edu.cn/provider/#/publish/',
    #         'agrs':['subject', 'beginTime', 'tenderName', 'syncId'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'长江大学采购与招标管理处',
    #         'url':'https://ztbgl.yangtzeu.edu.cn/system/resource/js/news/latestdynpullnews.jsp',
    #         'params':{
    #             "owner": "1462319923",
    #             "treeid": "1005",
    #             "viewid": "210876",
    #             "mode": "10",
    #             "orderField": "wbdate",
    #             "orderby": "desc",
    #             "locale": "zh_CN",
    #             "showorder": "Error not found out name:<b>showorder </b>",
    #             "pageUrl": "/gccg.htm",
    #             "uniqueId": "u2",
    #             "actionmethod": "getnewslist",
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=54ECA6F3631766B9CEF01435B03762CA",
    #             "origin": "https://ztbgl.yangtzeu.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://ztbgl.yangtzeu.edu.cn/gccg.htm",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': '',
    #         'datachild': 'data',
    #         'announcement':'https://ztbgl.yangtzeu.edu.cn/',
    #         'agrs':['showtitle', 'timestr', 'title', 'linkurl'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'广州大学采购管理信息平台',
    #         'url':'https://gdcggl.gzhu.edu.cn/systemAction_listNoticeGongzdt.action',
    #         'params':{
    #             "page": "1",
    #             "rows": "15",
    #             "sort": "dateTime",
    #             "order": "desc",
    #             "xinxlxNo": "03",
    #             "title":''
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=4D141529B56540AEA21DFBA156438B2A",
    #             "origin": "https://gdcggl.gzhu.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://gdcggl.gzhu.edu.cn/dynamic.jsp",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'rows',
    #         'datachild': 'data',
    #         'announcement':'',
    #         'agrs':['title', 'createTime', 'title', 'content'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    # {
    #         'name':'昆明医科大学',
    #         'url':'https://cgpt8090.kmmu.edu.cn/CGPT/web/getXejjgsList',
    #         'params':{
    #             "token": "e10943301e21c4f00a85c856f61150c1",
    #             "_wd": "cb8d27a75d905a3eaf04270ef4485f2e",
    #             "_wf": "da84f295f12a3340b93dc8ec1cef66c02dde44e2ca172a2f646f0f74f91ba5f74176911bb846c6b24b4206473ac"
    #                    "506bb58119c516e53272a1815472ba4b49573daa6dfd39a9bd5d6b2664645b17b474efa3da2a0c4bbaaddbdd36f"
    #                    "6462fbbed8"
    #         },
    #         'headers':{
    #             "authority": "sbcgczxxfb.sysc.tsinghua.edu.cn",
    #             "method": "POST",
    #             "path": "/sfw_cms/e",
    #             "scheme": "https",
    #             "accept": "application/json,text/javascript,*/*;q=0.01",
    #             "accept-encoding": "gzip,deflate, br",
    #             "accept-language": "zh-CN,zh;",
    #             "cache-control": "no-cache",
    #             "content-length": "235",
    #             "content-type": "application/x-www-form-urlencoded;charset=UTF-8",
    #             "cookie": "JSESSIONID=56A30CB3698C1C87547494B578D1A490",
    #             "origin": "https://cgpt8090.kmmu.edu.cn",
    #             "pragma": "no-cache",
    #             "referer": "https://cgpt8090.kmmu.edu.cn/CGPT/web/goEjflPage?token=2c725f3800cef292dcbc95114c95cb3"
    #                        "a&_wd=92923a19ee85422093a75463d2af5d27&_wf=87e6e09fe16c4773ed0667151571bad0ce820efcd068"
    #                        "5c094635ee98abbb46e19259bd24417acdc1dcea81f051324a389c61cfd94ab8ea64be91cc7e948ae079f19"
    #                        "b41b5f595e0d0e3323632d3b362c1af86c89809cd35440e83d7f2c3e3e174088e0a05fdf22a2818904eb955"
    #                        "03a8eda3626a528d82a43d678ba436ff27a08708255ce9cee94d93abb5cbbff9d760722a93131c7fad8017",
    #             "sec-ch-ua-mobile": "?0",
    #             "sec-ch-ua-platform": "Windows",
    #             "sec-fetch-dest": "empty",
    #             "sec-fetch-mode": "cors",
    #             "sec-fetch-site": "same-origin",
    #             "user-agent": "Mozilla / 5.0(WindowsNT10.0;Win64;x64) AppleWebKit / 537.36(KHTML, likeGecko) Chrome / 113.0.0.0Safari / 537.36Edg / 113.0.1774.42",
    #             "x-requested-with": "XMLHttpRequest"
    #                 },
    #         'data': 'rows',
    #         'datachild': 'data',
    #         'announcement':'',
    #         'agrs':['XMMC', 'GGFBRQ', 'XMMC', 'XMMC'],
    #         '翻译':['标题', '发布时间', '标名', '公告链接'],
    #         'methos':'post'
    #     },
    ]


def setinter(setone, settwo):
    # 判断两个set的交集是否为空
    if setone in settwo:
        return 'yes'
    else:
        return 'no'


def TianjinUniversity(www):
    data = []
    if www['methos'] == 'post':
        print('this is a post requests')
        res = requests.post(url=www['url'], headers=www['headers'], data=www['params'], verify=False)

        print(res, '文本+++++++++++++++')

        print(res.json())
        #
        if not www['data']:
            data = res.json()
        else:
            data = res.json()[www['data']]

        print(data, type(data))


    if www['methos'] == 'get':
        print('this is a get requests')
        res = requests.get(url=www['url'], headers=www['headers'], params=www['params'], verify=False)
        print(res)
        print(res.json)

        if not www['data']:
            data = res.json()
        else:
            data = res.json()[www['data']]

    dataList = []

    for i in data:
        setList = [setinter(j, i[www['agrs'][0]]) for j in keywords]

        if 'yes' in setList:
            dataList.append({'标题': i[www['agrs'][0]], '发布时间': i[www['agrs'][1]], '标名': i[www['agrs'][2]],
                             '公告链接': www['announcement'] + i[www['agrs'][3]]})

    return dataList


AllList = []

for www in dataList:
    print('开始++++++++++++++++')

    data = TianjinUniversity(www)

    AllList = AllList + data

print(AllList)
